package org.example.project.bookstore.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.example.bean.Book;
import org.example.util.JsonResult;
import org.springframework.stereotype.Service;

/**
 * @Auther:Liu
 * @Testname:BookService
 * @Date:2025/8/18 10:07
 */
@Service
public interface BookService extends IService<Book> {
    //获取低价书籍信息
    JsonResult getLowerBook(int number);

    //获取最新上架书籍
    JsonResult getNewBook(int number);


    //查询所有新书
    JsonResult getAllNewBook(int page,String token);

    //一级搜索查询分类图书
    JsonResult findBookByCateGory(int page, String categoryId,String token);


    //模糊查询
    JsonResult findBookByName(int page, String bookName,String token);


    //二级搜索,在分类基础下查询价格
    JsonResult findBookByCategoryAndPrice(int page, String categoryId, String bookName,String token);

    //二级搜索,再次模糊查询
    JsonResult findBookByNames(int page, String bookName, String bookName2,String token);

    //查询主页面四本低价书
    JsonResult findLower(int number);

    //查询所有低价书并排序
    JsonResult findLowerMore(int page,String token);

    //二级搜索低价书(按书名)
    JsonResult findLowerAndBooknameMore(int page, String bookname,String token);

    //二级搜索新鲜好书（按名称）
    JsonResult findNewBookByNameAndTime(int page, String bookName,String token);

}
